<script>
import Test19ZujianShijian2 from './Test19ZujianShijian2.vue'

export default {
  data() {
    return {
      msg:''
    }
  },
  components: {
    Test19ZujianShijian2//注册子组件
  },
  methods: {
    getHandle(msg) {
      console.log('触摸发送事件：'+msg)
      this.msg=msg
    }
  }
}
</script>

<template>
  <h3>父组件</h3>
  <p>{{msg}}</p>
  <!--  引用子组件-->
  <!-- @a="getHandle"：
  @a名字随便起，
  getHandle指向methods里面的函数
  -->
  <Test19ZujianShijian2  @a="getHandle"/>

</template>

